﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Thesis_2
{
    public partial class frmMain : Form
    {
        private string online;

        public frmMain()
        {
            InitializeComponent();
            mnuExit.Click += new EventHandler(mnuExit_Click);
            timer1.Tick += new EventHandler(timer1_Tick);
            this.FormClosing += new FormClosingEventHandler(frmMain_FormClosing);
            this.Load += new EventHandler(frmMain_Load);
            mnuProductEntry.Click += new EventHandler(mnuProductEntry_Click);
        }
        void mnuProductEntry_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmproduct frmP = new frmproduct();
            frmP.Show();         
        }
        void frmMain_Load(object sender, EventArgs e)
        {
            lblUser.Text = online;
        }
        public string passvalue
        {
            get { return online;}
            set { online = value; }
        }
        void frmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            Application.Exit();
        }
        void timer1_Tick(object sender, EventArgs e)
        {
            DateTime dt = DateTime.Now;
            this.ToolStripStatusLabel4.Text = dt.ToString();
        }
        void mnuExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }
    
    }
}
